package BUCF;

import java.util.HashSet;
import java.util.Set;

import com.travel.core.AbstractDao;

public class recommendSpots {
    private String userId;
    private int n;

    public recommendSpots() {
    }

    public recommendSpots(String userId, int n) {
        this.userId = userId;
        this.n = n;
    }

    public Set<String> getSpots() {
        Set<String> spots = new HashSet<String>();
        Set<String> spotsId = new UserCF(userId, n).getFavoriteSpot();
        for (String spotId : spotsId) {
            String spotName = AbstractDao.getSpotName(spotId);
            spots.add(spotName);
        }
        return spots;
    }

    public static void main(String[] args) {
        Set<String> spots = new recommendSpots("17428445", 10).getSpots();
        for (String spot : spots) {
            System.out.println(spot);
        }
    }
}
